package com.example.demo;


import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;

public class TextUtil {
    private static AtomicLong counter = new AtomicLong(0);

    private static  AtomicInteger atomicInteger = new  AtomicInteger(0);
    private static String m = "SYS-";

    public String addOne() {
       // long l = (int) counter.incrementAndGet();
        int i = atomicInteger.incrementAndGet();
        String format = String.format("%05d", i);

        return m + format;
    }

    public static void main(String args[]) {
        TextUtil c1 = new TextUtil();
        System.out.println(c1.addOne());
        TextUtil c2 = new TextUtil();
        System.out.println(c2.addOne());
    }

}
